package reflection.class_;

import java.io.Serializable;

/**
 * Created with IntelliJ IDEA
 * Description:观测所有具备Class对象的类型
 * User:22954
 * Date:2024-04-14
 * Time:19:50
 */
public class AllClassType {
    public static void main(String[] args) {
        Class<String> cls1 = String.class;//外部类
        Class<int[]> cls2 = int[].class;//数组
        Class<float[][]> cls3 = float[][].class;//二维数组
        Class<Serializable> cls4 = Serializable.class;//接口
        Class<SuppressWarnings> cls5 = SuppressWarnings.class;//注解
        Class<Thread.State> cls6 = Thread.State.class;//枚举
        Class<Character> cls7 = char.class;//基本数据类型
        Class<Void> cls8 = void.class;//void
        Class<Class> cls9 = Class.class;//Class类本身

        System.out.println(cls1);//class java.lang.String
        System.out.println(cls2);//class [I
        System.out.println(cls3);//class [[F
        System.out.println(cls4);//interface java.io.Serializable
        System.out.println(cls5);//interface java.lang.SuppressWarnings
        System.out.println(cls6);//class java.lang.Thread$State
        System.out.println(cls7);//char
        System.out.println(cls8);//void
        System.out.println(cls9);//class java.lang.Class
    }
}
